########### 版本要求
cmake_minimum_required(VERSION 2.8.3)
set(CMAKE_CXX_STANDARD 11)
# add_definitions(-std=c++11)
 
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -fpermissive")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
########### 项目名称
project(motor_control)

include_directories(
include
# ${catkin_INCLUDE_DIRS}
# ${YAML_CPP_INCLUDE_DIR}
# ${OpenCV_INCLUDE_DIRS}
)

SET(CMAKE_BUILD_TYPE "Debug")

find_package(Threads REQUIRED)
# add_execut/able(threaddemo main.cpp ${SOURCE_FILES})

#添加Eigen库，头文件
# find_package(EtherCAT REQUIRED)
# find_package(EtherCAT REQUIRED PATHS /usr/local/lib)
# find_package(Eigen3)
# include_directories(${EIGEN3_INCLUDE_DIRS})

include_directories(/usr/local/include)


# -Wall -I /opt/etherlab/include -l ethercat -L /opt/etherlab/lib
########### 编译可执行文件

add_executable(kemo kemo_io.c)
target_link_libraries(kemo PUBLIC /usr/local/lib/libethercat.so)

add_executable(modbus_use modbus_use.cpp)
target_link_libraries(modbus_use PUBLIC /usr/local/lib/libmodbus.so)
# add_executable(astar_self astar_self.cpp)
# add_executable(stewart_app stewart_app.cpp stewart.cpp)

# target_link_libraries(omron_control /opt/etherlab/lib/ethercat)
add_executable(omron_control omron_control.c)
target_link_libraries(omron_control PUBLIC /usr/local/lib/libethercat.so)
target_link_libraries(omron_control Threads::Threads)

add_executable(omronServo_kemoIO omronServo_kemoIO.c)
target_link_libraries(omronServo_kemoIO PUBLIC /usr/local/lib/libethercat.so)
target_link_libraries(omronServo_kemoIO Threads::Threads)

